package com.tuanzi.loan.web.lazy.banana.collaborate;

import com.tuanzi.loan.business.service.banana.collaborate.BananaRegistryService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.Collaborate.CollaborateStatListRequest;
import com.tuanzi.loan.vo.response.collaborate.CollaborateStatListResponse;
import org.springframework.data.domain.Page;

/**
 * User: liangZongXi
 * Create time: 17:12 2018/9/19
 * Description:
 */
public class CollaborateBananaStatListLazyDataModel extends BaseLazyDataModel<CollaborateStatListRequest, CollaborateStatListResponse> {
    private static final long serialVersionUID = -4751232613293038008L;

    private BananaRegistryService bananaRegistryService = SpringContextHolder.getBean(BananaRegistryService.class);

    public CollaborateBananaStatListLazyDataModel(CollaborateStatListRequest collaborateStatListRequest) {
        super(collaborateStatListRequest);
    }

    @Override
    protected Page<CollaborateStatListResponse> doLoad(PageSearcher<CollaborateStatListRequest> pageSearcher) {
        return bananaRegistryService.list(pageSearcher);
    }
}
